package misp_backend.controller;

import misp_backend.config.AjaxResult;
import misp_backend.domain.Packagedetails;
import misp_backend.service.PackagedetailsService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/packagedetails")
public class PackageDetailsController {
    @Autowired
    private PackagedetailsService packagedetailsService;
    @PostMapping("/add")
    public AjaxResult adddetails(@RequestBody Packagedetails details){
        return AjaxResult.success(packagedetailsService.save(details));
    }
}
